<div class="users form">
<?php echo $this->Form->create('User');?>
	<fieldset>
 		<legend><?php echo __('Edit User');?></legend>
	<?php
		echo $this->Form->input('id');
		echo $this->Form->input('cegek');
		echo $this->Form->input('nev');
		echo $this->Form->input('pass_change', array('value' => '', 'label' => 'Új jelszó', 'type' => 'password'));
		echo $this->Form->input('pass_confirm', array('value' => '', 'label' => 'Új jelszó ismét', 'type' => 'password'));
		echo $this->Form->input('csoport');
		echo $this->Form->input('locked');
		//print $this->Form->input('Osztaly');
		//debug($oIds);
		print '<select id="OsztalyOsztaly" multiple="multiple" name="data[Osztaly][Osztaly][]">';
			foreach($osztalyok as $ceg => $c){
				print '<optgroup label="'.$ceg.'">';
				foreach($c as $ev => $oszt){
					print '<optgroup label="'.$ceg.' - '.$ev.'">';
					foreach($oszt as $oId => $o){
						$selected = in_array($oId, $oIds) ? 'selected="selected"' : null;
						print '<option value="'.$oId.'" '.$selected.'>'.$o.'</option>';
					}
					print '</optgoup>';
				}
				print '</optgoup>';
			}
		print '</select>';

	?>
	</fieldset>
<?php echo $this->Form->end('Submit');?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $this->Html->link(__('Delete'), array('action'=>'delete', $this->Form->value('User.id')), null, sprintf(__('Are you sure you want to delete # %s?'), $this->Form->value('User.id'))); ?></li>
		<li><?php echo $this->Html->link(__('List Users'), array('action'=>'index'));?></li>
		<li><?php echo $this->Html->link(__('List Bizonylatok'), array('controller'=> 'bizonylatok', 'action'=>'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Bizonylat'), array('controller'=> 'bizonylatok', 'action'=>'add')); ?> </li>
	</ul>
</div>
